<%- include head %>
<div id="index" style="width:100%;height:66px;background:#ded5de;box-shadow: 2px 2px #b5b0b0 ;">
      <div >
           <div class="navbar1">
          <div class="w_1">
                <div class="logo fl">
                  <a href="/index"><img src="/images/logo.png"></a>
                  <span style="font-size:22px;font-family:'kaiti'">健康公众号客服系统</span>
                </div>
                <div class="fr">
                  <ul class="navbar1">
                    <li><a href="/kefu/admin" style="color:black"><h4>在线解答<h4></a></li>
                    <li><a href="/question" style="color:black"><h4>问题咨询</h4></a></li>
                    <li><a href="/answer_all" style="color:black"><h4>群发消息</h4></a></li>
                                          <li></li>
                      <li></li>
                      <li></li>
                      <li></li>
                    <li>用户名:<%=username %></li>
                    <li class="spacer"></li>
                    <li><a href="/login">退出</a></li>
                    </ul>
                </div>
            </div>
        </div>
      </div>
      <div class="main" style="margin-top:10px">
         <dv style="margin-left:10%;">
                <div>
			        <textarea style="width: 80%;height: 350px;max-width: 80%;max-height: 350px;margin-left:10%;margin-top:50px" placeholder="给用户解答留言" v-model="Content"></textarea>
			    </div>
			    <div>
			        <button style="width: 100px;height: 50px;max-width: 100px;max-height: 50px;margin-left:80%;margin-top:10px" v-on:click="sendMessage()">发送</button>
			    </div>
         </div>
      </div>
    </div>
<script>
var app = new Vue({
  el: '#index',
  data: {
    toggleUl: false,
    Content:''
  },
  methods:{
    sendMessage:function(){
        var postData={};
        postData.content = this._data.Content;
        this.$http.post('/api/admin_answer_all_user_api',postData)
        .then((response)=>{
              alert(response.data.msg);
              if(response.data.status_code==1){
              }
            },(response)=>{
                  alert("回复出错");
            })
    }
  }
})
</script>

<%- include foot %>

